<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/common.css"/>
    <link rel="stylesheet" href="css/font-awesome.min.css" />
</head>
<div class="wrap login_wrap">
    <div class="content">
        <div class="logo"></div>
        <div class="login_box">

            <div class="login_form">
                <div class="login_title">在线考试</div>
                <form th:action="@{/CanLogin}" method="post">
                    <div class="form_text_ipt">
                        <input name="username" type="text" placeholder="用户名/学号">
                    </div>
                    <div class="ececk_warning"><span>用户名/学号不能为空</span></div>
                    <div class="form_text_ipt">
                        <input name="userpwd" type="password" placeholder="密码">
                    </div>
                    <div class="ececk_warning"><span>密码不能为空</span></div>
                    <div id="nogg" style="text-align: center"><span style="color: red;text-align: center" id="sb" th:text="${session.errorInfo}"/></div>
                    <input type="hidden" id="cxdl" th:value="${session.cxdl}"/>
                    <script >
                            var sb = document.getElementById("sb").innerText;
                            if(sb!="") {
                                setTimeout(function () {
                                    document.getElementById("nogg").style.display = "none";
                                    location.replace("./llogout")
                                }, 1000);
                            }
                    </script>
                    <script>
                            var cxdl = document.getElementById("cxdl").value;
                          if (cxdl!="") {
                                alert("密码修改成功，请登录！");
                                location.replace("./llogout");
                          }
                    </script>
                    <div class="form_check_ipt">
                        <div class="left check_left">
                            <label><input name="" type="checkbox"> 下次自动登录</label>
                        </div>
                        <div class="right check_right">
                            <a href="#">忘记密码</a>
                        </div>
                    </div>
                    <div class="form_btn">
                        <button type="submit">登录</button>
                    </div>
                    <div class="form_reg_btn">
                        <span>还没有帐号？</span><a th:href="@{/register}">马上注册</a>
                    </div>
                </form>
                <div class="other_login">
                    <div class="left other_left">
                        <span>其它登录方式</span>
                    </div>
                    <div class="right other_right">
                        <a href="#"><i class="fa fa-qq fa-2x"></i></a>
                        <a href="#"><i class="fa fa-weixin fa-2x"></i></a>
                        <a href="#"><i class="fa fa-weibo fa-2x"></i></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/common.js" ></script>
</body>
</html>